package com.gusto.engine.clusterant.model;

import java.io.Serializable;

/**
 * <p>2D data point.</p>
 * 
 * @author amokrane.belloui@gmail.com
 *
 */
public class Point implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private int row, col;
	private Object object;
	
	public Point(int row, int col) {
		this.row = row;
		this.col = col;
	} 
	
	public Point(int row, int col, Object object) {
		this.row = row;
		this.col = col;
		this.object = object;
	}
	
	public String toString() {
		return row + "-" + col + ". " + object;
	}
	
	public boolean equals(Object o) {
		Point p = (Point)o;
		if ((p.getRow() == row) && (p.getCol() == col)) {
			return true;
		}
		return false;
	}
	
	public int getRow() {
		return row;
	}

	public void setRow(int row) {
		this.row = row;
	}

	public int getCol() {
		return col;
	}

	public void setCol(int col) {
		this.col = col;
	}

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}
}
